<template>
	<!-- 首页灵活用工详情页组件 -->
	<view class="main">
		<view class="title">
			选择你想创建的信息
		</view>	
		<!-- <view class="item" @click="go(1)" >
			<image src="../../../../static/image/qiuzhi.jpeg" mode=""></image>
			<u-button size="medium" @click="go(1)" type="warning">求职信息 <u-icon class="icon" name="arrow-right" color="#ffffff" size="28"></u-icon></u-button>
		</view> -->	
		
		<view class="item" @click="go(2)" >
			<image src="https://recruit-oss.oss-cn-beijing.aliyuncs.com/recruit/img/v1/zhaogong.jpeg" mode=""></image>
			<u-button size="medium" @click="go(2)" type="primary">招工信息 <u-icon class="icon" name="arrow-right" color="#ffffff" size="28"></u-icon></u-button>
		</view>	
	</view>
</template>
<script>
	import api from '../../../../api/routes.js'
	export default {

		data() {
			return {

				
				



			};
		},
		onLoad() {},

		methods: {
			async go(val){
				wx.showLoading()
				const res = await this.$myRequest({
					url: api.getAuthentication,
					method: "GET",
				});
				if (res.data.code == 0) {
					console.log(res.data.member,'获取认证')
					let  certNo = res.data.member.certNo
					let  certName = res.data.member.certName
					if(!certName||!certNo){
						wx.showToast({
							title: '你还没有进行个人认证',
							icon: 'none'
						})
						setTimeout(()=>{
							uni.navigateTo({
								url: '/package/pages/searchJob/other/shimingrenzheng',
							});
						},2000)
					}else{
						// if(val==1){
						// 	uni.navigateTo({
						// 		url: '/package/pages/searchJob/other/addInfoDetil?type=求职',
						// 	});
						// }else{
						// 	uni.navigateTo({
						// 		url: '/package/pages/searchJob/other/addInfoDetil?type=招工',
						// 	});
						// }
						uni.navigateTo({
							url: '/package/pages/searchJob/other/addInfoDetil1?type=招工',
						});
					}
					setTimeout(() => {
						wx.hideLoading()
					}, 2000)
				} else {
					wx.showToast({
						title: '获取认证失败',
						icon: 'none'
					})
				}
			
			},
			goGuzhu(){
				uni.navigateTo({
					url: '/package/pages/searchJob/other/woshiguzhu',
				});
			},
			goLinggong(){
				uni.navigateTo({
					url: '/package/pages/searchJob/other/woshilinggong',
				});
			},
			lgRegister() {
				console.log("林工登记！！！");
				uni.navigateTo({
					url: '/package/pages/components/lingGonRegister',
				});
			}
		},
		
	};
</script>

<!-- <style>
/* #ifndef H5 */
page {
  height: 100%;
  background-color: #f2f2f2;
}

/* #endif */
</style> -->

<style lang="scss" scoped>
	.main {
		background: #ffffff;
		.title{
			font-size: 32rpx;
			font-weight: bold;
			background: white;
			height: 200rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-family: Arial, Helvetica, sans-serif;
		}
		.item{
			width: 90%;
			height: 240rpx;
			margin-left: 5%;
			margin-top: 20rpx;
			border-radius: 10rpx;
			background: rgb(243,245,250);
			display: flex;
			align-items: center;
			u-button{
				margin-left: 40rpx;
				margin-right: 20rpx;
			}
			image{
				height: 200rpx;
				width: 300rpx;
			}
		}
	}
</style>